Optimal. Leaf size=294 \[ \frac {b^2 F_1\left (\frac {1}{2};\frac {1}{2} (-1-m),2;\frac {3}{2};\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^{1+m}(c+d x) \cos ^2(c+d x)^{\frac {1}{2} (-1-m)} \sin (c+d x)}{\left (a^2-b^2\right )^2 d}+\frac {a^2 F_1\left (\frac {1}{2};\frac {1-m}{2},2;\frac {3}{2};\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^{-1+m}(c+d x) \cos ^2(c+d x)^{\frac {1-m}{2}} \sin (c+d x)}{\left (a^2-b^2\right )^2 d}-\frac {2 a b F_1\left (\frac {1}{2};-\frac {m}{2},2;\frac {3}{2};\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2} \sin (c+d x)}{\left (a^2-b^2\right )^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 294, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2903, 3268,
440} \begin {gather*} \frac {b^2 \sin (c+d x) \cos ^{m+1}(c+d x) \cos ^2(c+d x)^{\frac {1}{2} (-m-1)} F_1\left (\frac {1}{2};\frac {1}{2} (-m-1),2;\frac {3}{2};\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right )}{d \left (a^2-b^2\right )^2}+\frac {a^2 \sin (c+d x) \cos ^{m-1}(c+d x) \cos ^2(c+d x)^{\frac {1-m}{2}} F_1\left (\frac {1}{2};\frac {1-m}{2},2;\frac {3}{2};\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right )}{d \left (a^2-b^2\right )^2}-\frac {2 a b \sin (c+d x) \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2} F_1\left (\frac {1}{2};-\frac {m}{2},2;\frac {3}{2};\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right )}{d \left (a^2-b^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 440
Rule 2903
Rule 3268
Rubi steps
\begin {align*} \int \frac {\cos ^m(c+d x)}{(a+b \cos (c+d x))^2} \, dx &=\int \left (\frac {a^2 \cos ^m(c+d x)}{\left (a^2-b^2 \cos ^2(c+d x)\right )^2}-\frac {2 a b \cos ^{1+m}(c+d x)}{\left (a^2-b^2 \cos ^2(c+d x)\right )^2}+\frac {b^2 \cos ^{2+m}(c+d x)}{\left (-a^2+b^2 \cos ^2(c+d x)\right )^2}\right ) \, dx\\ &=a^2 \int \frac {\cos ^m(c+d x)}{\left (a^2-b^2 \cos ^2(c+d x)\right )^2} \, dx-(2 a b) \int \frac {\cos ^{1+m}(c+d x)}{\left (a^2-b^2 \cos ^2(c+d x)\right )^2} \, dx+b^2 \int \frac {\cos ^{2+m}(c+d x)}{\left (-a^2+b^2 \cos ^2(c+d x)\right )^2} \, dx\\ &=\frac {\left (b^2 \cos ^{2 \left (\frac {1}{2}+\frac {m}{2}\right )}(c+d x) \cos ^2(c+d x)^{-\frac {1}{2}-\frac {m}{2}}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1+m}{2}}}{\left (-a^2+b^2-b^2 x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{d}+\frac {\left (a^2 \cos ^{2 \left (-\frac {1}{2}+\frac {m}{2}\right )}(c+d x) \cos ^2(c+d x)^{\frac {1}{2}-\frac {m}{2}}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1}{2} (-1+m)}}{\left (a^2-b^2+b^2 x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{d}-\frac {\left (2 a b \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{m/2}}{\left (a^2-b^2+b^2 x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {b^2 F_1\left (\frac {1}{2};\frac {1}{2} (-1-m),2;\frac {3}{2};\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^{1+m}(c+d x) \cos ^2(c+d x)^{\frac {1}{2} (-1-m)} \sin (c+d x)}{\left (a^2-b^2\right )^2 d}+\frac {a^2 F_1\left (\frac {1}{2};\frac {1-m}{2},2;\frac {3}{2};\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^{-1+m}(c+d x) \cos ^2(c+d x)^{\frac {1-m}{2}} \sin (c+d x)}{\left (a^2-b^2\right )^2 d}-\frac {2 a b F_1\left (\frac {1}{2};-\frac {m}{2},2;\frac {3}{2};\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2} \sin (c+d x)}{\left (a^2-b^2\right )^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(7214\) vs. \(2(294)=588\).
time = 25.58, size = 7214, normalized size = 24.54 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.18, size = 0, normalized size = 0.00 \[\int \frac {\cos ^{m}\left (d x +c \right )}{\left (a +b \cos \left (d x +c \right )\right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^m}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________